<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsList.aspx.cs" Inherits="admin_Corp_News_NewsList" %>

<%@ Register Src="../../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>公司资讯管理</title>
    <link rel="stylesheet" href="../../skin/Style.css" type="text/css" />

    <script type="text/javascript" src="../../../js/jquery.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="itemtitle">
            <h3>
                操作提示</h3>
        </div>
        <div class="itemtitle_tect">
            <p>
                标题名称：<asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                公司名称：
                <asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="立即查询" CssClass="i_button" /></p>
        </div>
        <div class="clr">
        </div>
        <div class="talbe_border">
            <asp:GridView ID="grdCorpNews" runat="server" AutoGenerateColumns="False" CellPadding="0"
                DataKeyNames="ID" GridLines="None" OnPageIndexChanging="grdCorpNews_PageIndexChanging"
                OnRowDataBound="grdCorpNews_RowDataBound" AllowPaging="False" CssClass="talbe_list"
                OnRowDeleting="grdCorpNews_RowDeleting">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="th20 tou" />
                        <ItemStyle CssClass="nolet" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="信息标题">
                        <ItemTemplate>
                            <%# Eval("Title").ToString().Length <= 15 ? Eval("Title").ToString() : Eval("Title").ToString().Substring(0,15)+"..." %>
                        </ItemTemplate>
                        <ItemStyle CssClass="left2" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="公司名称">
                        <ItemTemplate>
                            <%# Eval("CompanyName").ToString().Length <= 15 ? Eval("CompanyName").ToString() : Eval("CompanyName").ToString().Substring(0, 15) + "..."%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="添加日期">
                        <ItemTemplate>
                            <%# GetShortDate(Eval("AddDate").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="审核">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnUpdate" Font-Underline="false" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")+"|"+DataBinder.Eval(Container.DataItem, "Verify") %>'
                                Text='<%# DataBinder.Eval(Container.DataItem, "Verify").ToString()== "True" ? "已审" : "未审"%>'
                                OnCommand="lbtnUpdate_Command"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作选项">
                        <ItemTemplate>
                            <a href='NewsEdit.aspx?ID=<%# Eval("ID")%>'>编辑</a> |
                            <asp:LinkButton ID="lbtndelete" Text="删除" CommandName="delete" OnClientClick="return confirm('您确认删除该记录吗?');"
                                runat="server"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
            <div class="Paging">
                <p>
                <uc1:PageNo ID="PageNo1" runat="server" />
                </p>
                <input id="CheckBox2" name="CheckBox2" type="checkbox" onclick="SelectAll();" />
                <asp:Button ID="btnDelete" runat="server" Text="批量删除" OnClick="btnDelete_Click" CssClass="i_button" />
            </div>
        </div>
    </form>
</body>
</html>
